﻿<%@ Page Title="" Language="C#" MasterPageFile="../Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Fashion.Models.Contact>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Contact
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="contact">
        <fieldset>
            <% Html.EnableClientValidation(); %> 
                <% using (Ajax.BeginForm(new AjaxOptions { HttpMethod = "Post", OnComplete = "Contact.onComplete"}))
            { %>
            <legend><h1>Contact us</h1></legend>
            <br />
                <div class="editor-label">
                <%: Html.LabelFor(m => m.Name, new Dictionary<string, string>() { { "style", "font-weight: bold; display: inline;" } })%>
                </div>
                <div class="editor-field"><%: Html.TextBoxFor(m => m.Name) %>
                    <%: Html.ValidationMessageFor(m => m.Name) %>
                </div>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Email, new Dictionary<string, string>() { { "style", "font-weight: bold; display: inline;" } })%>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.Email) %>
                    <%: Html.ValidationMessageFor(m => m.Email) %>
                </div>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Message, new Dictionary<string, string>() { { "style", "font-weight: bold; display: inline;" } })%>
                </div>
                <div class="editor-field">
                    <%: Html.TextAreaFor(m => m.Message, 10, 55, null) %>
                    <%: Html.ValidationMessageFor(m => m.Message) %>
                </div>
                <p>
                    <div><button class="button">Send &raquo;</button></div>
                </p>
        </fieldset>
        <p id="result"><%: TempData["Message"] %></p>
    <% } %>
    </div>
</asp:Content>
